yum -y install \
gd \
libpng \
libpng-devel \
pcre \
pcre-devel \
libxml2-devel \
libjpeg-devel
tar jxvf php-5.6.11.tar.bz2 -C /opt
cd /opt/php-5.6.11
./configure \
--prefix=/usr/local/php5 \
--with-gd \
--with-zlib \
--with-apxs2=/usr/local/httpd/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-config-file-path=/usr/local/php5 \
--enable-mbstring
創(chuàng)新互聯(lián)-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設、高性價比瑪多網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式瑪多網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設找我們,業(yè)務覆蓋瑪多地區(qū)。費用合理售后完善,十載實體公司更值得信賴。
make && make install
[root@localhost php-5.6.11]# cp php.ini-development /usr/local/php5/php.ini
[root@localhost php-5.6.11]# ln -s /usr/local/php5/bin/* /usr/local/bin/
vim /etc/httpd.conf
//在空白行添加下面兩行代碼
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php
// DirectoryIndex index.html 后面添加 index.php
vi /usr/local/httpd/htdocs/index.html
mv index.html index.php
service httpd stop
service httpd start
mysql -u root -p
//創(chuàng)建一個數(shù)據(jù)庫//
mysql> CREATE DATABASE bbs;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| bbs |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
'//給用戶bbquser設置密碼admin123并設置所有權限,所有終端都可登錄'
mysql> GRANT all ON bbs.* TO 'bbsuser'@'%' IDENTIFIED BY 'admin123';
//刷新數(shù)據(jù)庫//
mysql>flush privileges;
mysql>exit
unzip Discuz_X2.5_SC_UTF8.zip -d /opt
cp -r upload/ /usr/loacl/httpd/htdocs/bbs
出現(xiàn)論壇即成功,但是全權限不夠
[root@localhost local]# cd /usr/local/httpd/htdocs/
[root@localhost htdocs]# ls
bbs index.php
[root@localhost htdocs]# cd bbs
[root@localhost bbs]# ls -l
//改變宿主權限
drwxr-xr-x. 2 root root 90 12月 27 12:30 config
drwxr-xr-x. 13 root root 216 12月 27 12:30 data
drwxr-xr-x. 6 root root 92 12月 27 12:30 uc_client
//輸入
[root@localhost bbs]# chown -R daemon ./config
[root@localhost bbs]# chown -R daemon ./data
[root@localhost bbs]# chown -R daemon ./uc_client
[root@localhost bbs]# chown -R daemon ./uc_server/data
//權限就變成
drwxr-xr-x. 2 daemon root 90 12月 27 12:30 config
drwxr-xr-x. 13 daemon root 216 12月 27 12:30 data
drwxr-xr-x. 6 daemon root 92 12月 27 12:30 uc_client
chown -R daemon ./config
chown -R daemon ./data
chown -R daemon ./uc_client
chown -R daemon . /uc_server/data