sudo yum install git
cd /usr/local/src/ wget https://nodejs.org/dist/v4.6.0/node-v4.6.0.tar.gz
tar zxvf node-v4.6.0.tar.gz
cd node-v4.6.0/ ./configure // 执行 Node.js 安装包自带的脚本,修改相关的系统配置文件
yum install gcc
yum install gcc-c++
yum install gcc-gfortran
cd node-v4.6.0/ ./configure // 执行 Node.js 安装包自带的脚本,修改相关的系统配置文件 make //编译 C源代码为 可执行的 Linux程序
sudo make install // 安装文件 node –version //查看安装node的版本 npm -v //查看npm的版本
npm install -gd express-generator forever
express testapp cd testapp npm install npm start
cat package.json
forever start ./bin/www
forever list
forever stop 0 //0代表前面[0],这是当前进程的ID
forever stopall
yum install epel-release
yum install nginx
service nginx start
systemctl enable nginx
vim /etc/nginx/nginx.conf //使用lnpm意见安装,Nginx 目录: /usr/local/nginx/
server {
listen 80;
server_name jakexin.top,www.jakexin.top; #绑定的域名
location /
{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:3000; #对应该的Nodejs程序端口
}
access_log /mnt/log/www/jakexin_access.log; #网站访问日志
}
nginx -t
service nginx restart
yum list | grep mysql
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm yum repolist enabled | grep “mysql.-community.“ //查看当前可用资源
yum -y install mysql-community-server
systemctl enable mysqld //添加到开机启动 systemctl start mysqld //启用进程 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 [设置root用户密码] 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 [禁止root远程登录] ... 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 [删除test数据库] - Dropping test database... ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist ... Failed! Not critical, keep moving... - 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! All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL! Cleaning up...
GRANT ALL PRIVILEGES ON . TO ‘root'@'%' IDENTIFIED BY ‘密码' WITH GRANT OPTION; //添加授权的用户 flush privileges; //刷新数据库
netstat -tunlp
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有