在线精品99_中国九九盗摄偷拍偷看_91免费版在线观看_91.app_91高清视频在线_99热最新网站

Ubuntu如何搭建php5.6Web服务器环境

120次阅读
没有评论

共计 7081 个字符,预计需要花费 18 分钟才能阅读完成。

今天丸趣 TV 小编给大家分享一下 Ubuntu 如何搭建 php5.6Web 服务器环境的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。

ubuntu 16.04 默认安装 php7.0 环境,但是 php7 目前对某些旧系统的兼容性并不是很好,如果自行安装 php5 需要清除 php7 的已安装包,否则会报错。

移除默认及已安装的 php 包

sudo dpkg -l | grep php| awk  {print $2}  |tr  \n     
sudo apt-get install aptitude
sudo aptitude purge `dpkg -l | grep php| awk  {print $2}  |tr  \n     `

添加 ppa

sudo add-apt-repository ppa:ondrej/php

安装 php5.6

sudo apt-get update
sudo apt-get install php5.6

安装扩展

sudo apt-get install php5.6-gd
sudo apt-get install php5.6-mysql

安装 apache2

sudo apt install apache2
sudo apt-get install libapache2-mod-php5.6

安装 mysql

sudo apt install mysql-server php5.6-mysql root root0x0
sudo apt-get install mysql-client
mysql_secure_installation

安装 phpmyadmin

sudo apt-get install phpmyadmin
sudo apt-get install php5.6-mbstring
sudo apt-get install php5.6-gettext
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin

配置 phpmyadmin

nano /etc/php/5.6/apache2/php.ini
display_errors = on(显示错误日志,出现两次,都要改,不然无效)
extension=php_mbstring.dll (开启 mbstring)
sudo dpkg-reconfigure phpmyadmin (重新配置 phpmyadmin)

增加网站

sudo ln -s /etc/apache2/sites-available/files.conf /etc/apache2/sites-enabled/files.conf
sudo chown -r www-data /var/www/tianya
sudo /etc/init.d/apache2 restart

添加 ftp

sudo apt install vsftpd
useradd -d /var/www/tianya -s /sbin/nologin myftp
passwd myftp
chmod 777 -r /var/www/tianya
usermod -s /sbin/nologin myftp
vim /etc/vsftpd.conf
vim /etc/vsftpd.chroot_list
service vsftpd restart
service vsftpd status
# example config file /etc/vsftpd.conf
# the default compiled in settings are fairly paranoid. this sample file
# loosens things up a bit, to make the ftp daemon more usable.
# please see vsftpd.conf.5 for all compiled in defaults.
# read this: this example file is not an exhaustive list of vsftpd options.
# please read the vsftpd.conf.5 manual page to get a full idea of vsftpd s
# capabilities.
# run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
#userlist_enable=yes
#userlist_deny=no
#userlist_file=/etc/vsftpd.user_list
listen=yes
# run standalone with ipv6?
# like the listen parameter, except vsftpd will listen on an ipv6 socket
# instead of an ipv4 one. this parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=yes
# allow anonymous ftp? (disabled by default)
anonymous_enable=no
# uncomment this to allow local users to log in.
local_enable=yes
# uncomment this to enable any form of ftp write command.
write_enable=yes
# default umask for local users is 077. you may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd s)
local_umask=022
# uncomment this to allow the anonymous ftp user to upload files. this only
# has an effect if the above global write enable is activated. also, you will
# obviously need to create a directory writable by the ftp user.
#anon_upload_enable=yes
# uncomment this if you want the anonymous ftp user to be able to create
# new directories.
#anon_mkdir_write_enable=yes
# activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=yes
# if enabled, vsftpd will display directory listings with the time
# in your local time zone. the default is to display gmt. the
# times returned by the mdtm ftp command are also affected by this
# option.
use_localtime=yes
# activate logging of uploads/downloads.
xferlog_enable=yes
# make sure port transfer connections originate from port 20 (ftp-data).
connect_from_port_20=yes
# if you want, you can arrange for uploaded anonymous files to be owned by
# a different user. note! using  root  for uploaded files is not
# recommended!
#chown_uploads=yes
#chown_username=whoever
# you may override where the log file goes if you like. the default is shown
# below.
xferlog_file=/var/log/vsftpd.log
# if you want, you can have your log file in standard ftpd xferlog format.
# note that the default log file location is /var/log/xferlog in this case.
xferlog_std_format=yes
# you may change the default value for timing out an idle session.
#idle_session_timeout=600
# you may change the default value for timing out a data connection.
#data_connection_timeout=120
# it is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
# enable this and the server will recognise asynchronous abor requests. not
# recommended for security (the code is non-trivial). not enabling it,
# however, may confuse older ftp clients.
#async_abor_enable=yes
# by default the server will pretend to allow ascii mode but in fact ignore
# the request. turn on the below options to have the server actually do ascii
# mangling on files when in ascii mode.
# beware that on some ftp servers, ascii support allows a denial of service
# attack (dos) via the command  size /big/file  in ascii mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ascii mangling is a horrible feature of the protocol.
#ascii_upload_enable=yes
#ascii_download_enable=yes
# you may fully customise the login banner string:
ftpd_banner=welcome to blah ftp service.
# you may specify a file of disallowed anonymous e-mail addresses. apparently
# useful for combatting certain dos attacks.
#deny_email_enable=yes
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
# you may restrict local users to their home directories. see the faq for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=yes
# you may specify an explicit list of local users to chroot() to their home
# directory. if chroot_local_user is yes, then this list becomes a list of
# users to not chroot().
# (warning! chroot ing can be very dangerous. if using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
chroot_local_user=yes
chroot_list_enable=yes
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
# you may activate the  -r  option to the builtin ls. this is disabled by
# default to avoid remote users being able to cause excessive i/o on large
# sites. however, some broken ftp clients such as  ncftp  and  mirror  assume
# the presence of the  -r  option, so there is a strong case for enabling it.
#ls_recurse_enable=yes
# customization
# some of vsftpd s settings don t fit the filesystem layout by
# default.
# this option should be the name of a directory which is empty. also, the
# directory should not be writable by the ftp user. this directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
# this string is the name of the pam service vsftpd will use.
pam_service_name=vsftpd
# this option specifies the location of the rsa certificate to use for ssl
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# this option specifies the location of the rsa key to use for ssl
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

以上就是“Ubuntu 如何搭建 php5.6Web 服务器环境”这篇文章的所有内容,感谢各位的阅读!相信大家阅读完这篇文章都有很大的收获,丸趣 TV 小编每天都会为大家更新不同的知识,如果还想学习更多的知识,请关注丸趣 TV 行业资讯频道。

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-14发表,共计7081字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 免费人成观看在线网 | 国产精品性视频免费播放 | 寂寞午夜影院 | 精品人妻潮喷久久久又裸又黄 | 久久国产精品偷 | 九九成人 | 亚洲av无码乱码国产精品fc2 | 国产精品av免费观看 | 综合久久给合久久狠狠狠97色 | 欧美国产一区二区 | 在线播放大乳乱 | 日日碰夜夜操 | 亚洲第一成人天堂第一 | 日韩欧美在线播放 | 国产成人无码一区二区在线观看 | 国产宅男 | 日本一卡精品视频免费 | 无码无套少妇毛多69xxx | 乡下女色又黄一级毛片 | 精品无码成人片一区二区98 | 狠狠亚洲丁香综合久久 | 高潮白浆潮喷正在播放 | 久久久久久亚洲精品影院 | 国产中文 | 国产亚洲精品久久久久久久久 | 国产亚洲综合一区二区在线 | 日韩国产精品亚洲а∨天堂免 | 欧美视频免费一区二区三区 | 一区二区在线视频 | 2017天天鲁夜夜夜夜夜夜夜 | 久久久午夜精品福利内容 | 一级夫妻黄色片 | 小13箩利洗澡无码免费视频 | 香蕉免费一区二区三区 | 欧美精品日韩 | 国产亚洲精品久久久久丝瓜 | 久久精品午夜一区二区福利 | 欧美激情欧美狂野欧美精品免费 | 亚洲一二区视频 | 男男车车的车车网站w98免费 | 国产丝袜无码一区二区三区视频 |