linux环境安装与论坛搭建
1.基础操作
groupadd hehe
useradd zzw -g hehe
passwd zzw
123456
useradd hehecici
passwd hehecici
123456
cd /root
mkdir -p hehe/haha
ls
cd hehe/haha
touch a.txt
vim a.txt
aaaaa
touch b.txt
vim b.txt
bbbbb
chown root:hehe a.txt
chown zzw:hehe b.txt
chmod 631 a.txt
chmod 000 b.txt
cp b.txt c.txt
pwd
ll
2.ftp
groupadd hehe
useradd -g hehe zzw
echo “123456” |passwd --stdin zzw
useradd hehecici
echo “123456” |passwd --stdin hehecici
mkdir -p /root/hehe/haha
cd /root/hehe/haha
echo aaaaa > a.txt
echo bbbbb > b.txt
chown root:hehe a.txt
chown zzw:hehe b.txt
chmod 631 a.txt
chmod 000 b.txt
cp b.txt c.txt
————————————————
systemctl stop firewalld.service
setenforce 0
yum -y install vsftpd
service vsftpd start或systemctl start vsftpd.service
useradd -M -d /root/hehe/haha -s /sbin/nologin neo
passwd neo
123456
vim /etc/pam.d/vsftpd
全部注释掉
auth required /lib64/security/pam_userdb.so db=/etc/vsftpd/vuser_passwd
account required /lib64/security/pam_userdb.so db=/etc/vsftpd/vuser_passwd
vim /etc/vsftpd/vuser_passwd.txt
zzw
123456
hehecici
123456
cd /etc/vsftpd/
db_load -T -t hash -f vuser_passwd.txt vuser_passwd.db
mkdir vuser_conf
cd vuser_conf/
vim zzw
local_root=/root/hehe/haha
anon_umask=022
write_enable=YES
anon_upload_enable=YES
anon_world_readable_only=NO
download_enable=NO
vim hehecici
local_root=/root/hehe/haha
write_enable=YES
anon_umask=022
anon_world_readable_only=NO
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
vim /etc/vsftpd/vsftpd.conf
guest_enable=YES
guest_username=neo
user_config_dir=/etc/vsftpd/vuser_conf
allow_writeable_chroot=YES
cd /root/hehe/
chown -R neo:neo haha/
chmod -R 775 haha/
service vsftpd restart
根目录下:chmod -R 777 /root/hehe/haha
账号在根目录下新建文件。
echo aaaaa > g.txt
echo aaaaa > e.txt
yum -y install ftp
ftp 私网ip或127.0.0.1
put *.txt
get *.txt
vim /etc/samba/smb.conf #配置文件
[haha]
path = /root/hehe/haha
valid users=hehecici,zzw
writable=yes
write list =hehecici,zzw
#为系统用户添加为smb用户
#Samba用户的密码与系统用户的密码没有任何关系
smbpasswd -a zzw
123456
smbpasswd -a hehecici
123456
pdbedit -L #显示目前系统中已经存在的所有Samba用户
groupadd zzwa
usermod -g zzwa zzw
chown -R hehecici:zzwa /root/hehe/haha/
chmod -R 733 /root
ls -l /root/hehe/haha/
systemctl restart smb
smb访问测试
smbclient -L IP //列出所有共享目录
smbclient //127.0.0.1/haha -U hehecici%123456
smbclient //127.0.0.1/haha -U zzw%123456
get
put
(完全卸载
PHPhttps://www.cnblogs.com/sunshine-H/p/8117105.html?tdsourcetag=s_pcqq_aiomsg)
3.lamp环境安装
https://blog.csdn.net/qq_30118843/article/details/82291869?tdsourcetag=s_pcqq_aiomsg
Xftp 6安装
安装包存放路径:/var/www/html
(1) Discuz 安装
lamp环境安装
https://blog.csdn.net/qq_30118843/article/details/82291869?tdsourcetag=s_pcqq_aiomsg
安装zip解压工具:yum install zip unzip
解压:unzip Discuz.zip
返回上级:cd …
给权限:chmod -R 777 html
输入公网:39.106.230.101
密码设定:admin
删除目录:rm -rf html
mkdir html
(3)wordpress安装
lamp环境安装
https://blog.csdn.net/qq_30118843/article/details/82291869?tdsourcetag=s_pcqq_aiomsg(安装除PHP外的所有)
在三个启动前安装php7
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum makecache
yum -y install php70w* --skip-broken
service httpd restart
php –v
(之后按照网页启动)
安装zip解压工具:yum install zip unzip
cd /var/www/html
解压:unzip wordpress.zip
返回上级:cd …
给权限:chmod -R 777 html
Html下:cp wp-config-sample.php wp-config.php
修改配置文件:vim wp-config.php
define( ‘DB_NAME’, ‘wordpress’ );
/** MySQL database username */
define( ‘DB_USER’, ‘root’ );
/** MySQL database password */
define( ‘DB_PASSWORD’, ‘root’ );
根目录下,进入数据库:mysql -u root –p
密码:root
create database wordpress;
show databases;
安装时打勾,账号密码都admin。
(2)Ecshop安装
yum -y install httpd
yum -y install unzip zip
yum -y install lrzsz
yum -y install php
yum -y install php-mysql
yum -y install mysql
yum -y install mariadb-devel
yum -y install mariadb-server
vim /etc/php.ini
date.timezone = Asia/Shanghai
systemctl start httpd
systemctl start mariadb
cd /var/www/html/
ls
unzip ECshop_v3.6.0_UTF8_release.zip
ls
mv ECshop_v3.6.0_UTF8_release/ecshop/ ./
mv ECshop_v3.6.0_UTF8_release/appserver/ ./
chmod -R 777 ecshop/
chmod -R 777 appserver/
mysqladmin -uroot password或mysqladmin -uroot -proot
cp -R ecshop/* ./
mv appserver/ …/
www目录下给权限:chmod -R 777 html