Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #先修改好httpd.conf
- setenforce 0
- service httpd restart
- #將test.php放置到www目錄下
- ---------------------------------------------------------------------------
- #安裝apache 4.4.7
- ./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --with-mpm=worker --enable-cache --enable-file-cache --enable-disk-cache --enable-mem-cache --enable-mime-magic --enable-headers --enable-http --enable-cgi --enable-rewrite --enable-so --with-suexec-gidmin --with-suexec-logfile
- make
- make install
- gedit /usr/local/apache/conf/httpd.conf
- #找到 822 AddType application/x-tar .tgz 並在那之上加入
- AddType application/x-httpd-php .php .php4 .php3 .phtml
- AddType application/x-httpd-php-source .phps
- #修改連入localhost的port
- 219 Listen 8080
- #修改站台預設目錄
- 308 DocumentRoot "/usr/local/apache/htdocs"
- --> /var/www/html
- 333 <Directory "/var/www/html">
- 362 </Directory>
- 368 UserDir www
- 374 <Directory /home/*/www>
- 375 # AllowOverride FileInfo AuthConfig Limit Indexes
- 376 Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
- 377 # <Limit GET POST OPTIONS PROPFIND>
- 378 # Order allow,deny
- 379 # Allow from all
- 380 # </Limit>
- 381 # <LimitExcept GET POST OPTIONS PROPFIND>
- 382 # Order deny,allow
- 383 # Deny from all
- 384 # </LimitExcept>
- 385 </Directory>
- 395 DirectoryIndex index.html index.php index.htm index.html.var
- ---------------------------------------------------------------------------
- #為php編譯mcrypt函數
- ./configure
- make
- make install
- ---------------------------------------------------------------------------
- #php安裝
- ./configure --prefix=/usr/local/php --with-mysql --with-apxs2=/usr/local/apache/bin/apxs -enable-mbstring=tw --with-mcrypt --with-zlib-dir=/usr --with-jpeg-dir=/usr
- #Thank you for using PHP. <-- 一定要出現才能make!!!
- make
- #Build complete <-- 也一定要出現才能intall!!!
- make install
- ----------------------------------------------------------------------------
- cp php.ini-dist /usr/local/php/lib/php.ini
- #if mysql have problem 讓在PHP4環境中,用phpMyadmin可以連MySQL,如果沒做,使用者無法登入
- ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
- /usr/local/apache/bin/apachectl start
- /etc/rc.d/init.d/mysqld restart
- /usr/bin/mysqladmin -u root password 'ntcbim'
- xoops,apache 4.4.7--> http://localhost:8080/
- mysql apache 5.3--> http://localhost/
- #讓xoops能夠連到mysql資料庫
- update user set password=Old_password(“centos”) where user=“root”;
- flush privileges;
Add Comment
Please, Sign In to add comment