您好,登錄后才能下訂單哦!
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
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
<?php
phpinfo();
?>
mv index.html index.php
service httpd stop
service httpd start
mysql -u root -p
//創建一個數據庫//
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';
//刷新數據庫//
mysql>flush privileges;
mysql>exit
unzip Discuz_X2.5_SC_UTF8.zip -d /opt
cp -r upload/ /usr/loacl/httpd/htdocs/bbs
出現論壇即成功,但是全權限不夠
[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
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。