linux常用命令

mv oldfilename newfilename
cp

#把mnt/hgfs/drive的一个文件复制到Desktop/night/linux目录下
cp /mnt/hgfs/drive/[file] ~/Desktop/night/linux
#复制文件夹


#看是否已经有tomcat在运行了
ps -ef |grep tomcat

#如果有,用kill;
kill -9 pid #pid 为相应的进程号

例如 ps -ef |grep tomcat 输出如下

kill -9 2971 --杀死tomcat服务
--查询后台所有用户进程
u 查询详细进程
ps -aux

#查看apache服务器是否安装
rpm -qa |grep httpd

rpm -qa|grep mysql
--查看包的依赖情况
1。首先卸载 libdbi-dbd-mysql
rpm -e libdbi-dbd-mysql

#linux删除文件
rm -rf [filename]

#查看apache服务是否启动
ps -ef|grep httpd
service httpd restart

#修改apache服务的端口 默认80


#重启apache 服务
#/etc/rc.d/init.d/httpd restart
#各服务的端口地址在/etc/servies文件的下面,直接修改该文件即可。可以用cat命令查看:
#查看httpd各个服务的端口

#cat /etc/services |grep http


CATALINA_BASE:   /usr/tomcat6
CATALINA_HOME:   /usr/tomcat6
CATALINA_TMPDIR: /usr/tomcat6/temp
JRE_HOME:        /usr
CLASSPATH:       /usr/tomcat6/bin/bootstrap.jar


/usr/java/jdk1.6.0_21/bin/


export JAVA_HOME=/usr/java/jdk1.6.0_21
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin



.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/mysql-connector-java-3.2.0.jar:$JAVA_HOME/lib/classes12.jar



[root@localhost bin]# ./startup.sh
Using CATALINA_BASE:   /usr/tomcat6
Using CATALINA_HOME:   /usr/tomcat6
Using CATALINA_TMPDIR: /usr/tomcat6/temp
Using JRE_HOME:        /usr/java/jdk1.6.0_21
Using CLASSPATH:       /usr/tomcat6/bin/bootstrap.jar


#set java environment
JAVA_HOME=/usr/java/jdk1.6.0_21
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH


保存退出,然后给java.sh分配权限:chmod 755 /etc/profile.d/java.sh

MySQL-server-5.1.42-0.glibc23.i386.rpm

/usr/bin/mysqladmin -u root password xiaoxiao


mysql-4.1.7-4.RHEL4.1
libdbi-dbd-mysql-0.6.5-10.RHEL4.1
mysqlclient10-3.23.58-4.RHEL4.1
mysql-bench-4.1.7-4.RHEL4.1
mysql-server-4.1.7-4.RHEL4.1
mod_auth_mysql-2.6.1-2.1
mysql-devel-4.1.7-4.RHEL4.1
php-mysql-4.3.9-3.1


---------------

mysql-devel-4.1.7-4.RHEL4.1
php-mysql-4.3.9-3.1
mysqlclient10-3.23.58-4.RHEL4.1
mysql-4.1.7-4.RHEL4.1

rpm -e mysql --nodeps



./configure -prefix=/data1/mysql -enable-thread-safe-client -with-extra-charsets=utf8 -with-plugins=all

chown -R mysql /data1/mysql/var


"/etc/rc.d/init.d/mysqld


/data1/mysql/bin/mysqladmin -u root password '123456'

find / -name mysql.sock




./configure --prefix=/usr/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/php --enable-sockets --with-mysql=/usr/local/mysql/ --with-zlib-dir=/usr/include --with-gd


/usr/local/apache2

./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2\   --enable-mods-shared=most --enable-usertrack=shared




你可能感兴趣的:(java,tomcat,PHP,linux,mysql)