linux命令1(服务器启动相关)
来源:互联网 发布:ug编程用在什么地方 编辑:程序博客网 时间:2024/05/22 13:38
¥
将rysnc和mongod加到linux启动脚本的方法如下:
在/etc/rc.d/rc.local文件末尾加入以下两行。
rsync --daemon
cd /dir/MongoDB ; sh mongo_start.sh
这篇文章讲的很好。
http://linux.chinaunix.net/techdoc/beginner/2008/09/05/1030518.shtml
¥
lsof -i:80
netstat -apn|grep <端口号>
/usr/local/nginx/conf
¥
rpm -qa | grep redis | xargs rpm -ql
redis目录
aaa/daemon/redis/bin
redis客户端启动命令;
./redis-cli
redis服务端启动命令:
./redis-server
启动redis客户端
¥
service nginx restart
service mysqd restart
¥
chown apache:apache templates_c/
grant select,update on jeecnDB.* to jeecn@localhost identified by ‘jeecn’
¥
启动apache服务
service httpd start
service httpd restart
apache配置文件地址:
vi /etc/httpd/conf/httpd.conf
¥
打开Apache的错误提示
如果使用PHP + Apache,在缺省设置下,PHP编码错误是不会提示的,这对于开发来说,是很不方便的。可以使用以下步骤打开出错提示:
1. 打开php.ini文件。
以我的vps为例,这个文件在: /etc/php5/apache2 目录下。
2. 搜索并修改下行,把Off值改成On
display_errors = Off
3. 搜索下行
error_reporting = E_ALL & ~E_NOTICE
或者搜索:
error_reporting = E_ALL & ~E_DEPRECATED
修改为
error_reporting = E_ALL | E_STRICT
4. 修改Apache的 httpd.conf
以我的 Ubuntu 为例, 这个文件在:/etc/apache2/ 目录下,这是一个空白文件。
添加以下两行:
php_flag display_errors on
php_value error_reporting 2039
5. 重启Apache,就OK了
重启命令:sudo /etc/init.d/apache2 restart
¥
添加httpd服务:
[root@localhost ~]# chkconfig --add httpd
2、查看httpd服务:[root@localhost ~]# chkconfig --list|grep httpd
httpd 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭
3、开机时自动运行httpd服务:
[root@localhost ~]# chkconfig --level 345 httpd on
4、查看httpd服务状态:
[root@localhost ~]# chkconfig --list|grep httpd
¥
启动mongodb服务器
MongoDB/mongo_start.sh
¥
- linux命令1(服务器启动相关)
- Linux启动服务器的相关命令
- linux启动服务器命令
- Linux硬盘启动相关命令
- oracle在linux下启动相关命令
- linux服务器状态、性能相关命令
- linux服务器状态、性能相关命令
- linux服务器状态、性能相关命令
- Linux服务器上启动oracle命令
- 正确用linux命令启动tomcat服务器
- linux svn服务器启动停止命令
- linux 服务器couchbase启动和关闭命令
- linux 服务器couchbase启动和关闭命令
- 远程控制服务器相关/文件处理相关的一些linux(Ubuntu)命令
- Linux终端命令-程序文件相关命令(1)
- 服务器相关命令
- Ubuntu服务器相关命令
- redis服务器相关命令
- c语言 栈和堆的区别
- Mysql函数INSTR、LOCATE、POSITION VS LIKE
- 删除除某个文件之外的其它文件
- java的几种对象(PO,VO,DAO,BO,POJO)解释
- 指针函数和函数指针
- linux命令1(服务器启动相关)
- linux 各种信号及其含义
- Filter、Listener、Interceptor之间那些纠结
- snmp协议扩展
- 使用Python通过Thrift接口访问HBase和Hive
- Linux进程间通信之信号量(semaphore)、消息队列(Message Queue)和共享内存(Share Memory)
- hdu 4500 腾讯马拉松第一题
- 【JMX】6. 连接MBean:JConsole
- IOS CoreText.framework --- 行 CTLineRef