#以 root 用户登陆服务器 ssh root@198.xxx.xxx.xxx ... #系统更新 yum update ...
yum install httpd
service httpd start
yum install mysql-server
service mysqld start
/usr/bin/mysql_secure_installation
[root@CentOS6 ~]# /usr/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL!
yum install php php-mysql
#切换到 Apache 默认网页目录 cd /var/www/html #创建一个 php 脚本文件 touch phpinfo.php #向文件写入一小段 php 脚本,测试用 echo '<?php phpinfo(); ?>' > phpinfo.php # 因为刚刚安装了 PHP,所以别忘了重启一下 Apache,否则 PHP 不能正常工作 service httpd restart
yum install vsftpd
#编辑 vsftpd 配置文件 vi /etc/vsftpd/vsftpd.conf ... #不允许匿名登陆 anonymous_enable=NO #本地账户可以登陆 local_enable=YES #可以写入 write_enable=YES #所有用户只能访问其 home 目录 chroot_local_user=YES ... #重启 vsftpd 以上设置才能生效 service vsftpd restart
#添加用户 lichao adduser lichao #为 lichao 设置密码 passwd lichao #如果出于安全考虑,这个用户你只想它能登陆 vsftpd, #而不能以 ssh 方式登陆服务器,可以禁止其 ssh 登陆 usermod -s /sbin/nologin lichao
chkconfig httpd on chkconfig mysqld on chkconfig vsftpd on
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有