大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
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
创新互联-专业网站定制、快速模板网站建设、高性价比玛多网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式玛多网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖玛多地区。费用合理售后完善,十载实体公司更值得信赖。
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
//创建一个数据库//
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