搭建測試環境常用linux命令__linux

來源:互聯網
上載者:User
建立使用者
useradd  -m -d  目錄   -s  /usr/bin/csh  yonghu
修改密碼
passwd 使用者
刪除使用者
userdel -r 使用者
切換使用者
su -u pog
複製cp [選項] 源檔案或目錄 目標檔案或目錄
cp /home/cds /home/pog
解壓
unzip /home/pog.zip
啟動
tomcat/bin/startup.sh
查看啟動狀態
tomcat/logs
配置環境變數 /etc/profile
顯示環境變數
echo $BASEID
設定一個新的環境變數
export MYNAME=”my name is kevin” 
顯示所有環境變數
env
配置完用source
安裝文檔:CSB
從伺服器到伺服器下載檔案
ftp命令
#ftp 10.71.192.17
#put apache-tomcat-6.0.35.tar.gz
解壓gz結尾檔案
> tar -xzvf apache-tocmat-6.0.35.tar.gz
壓縮/home下包括它的子目錄檔案,壓縮後檔案名稱apache-tomcat-6.0.35.tar.gz
> tar czvf apache-tocmat-6.0.35.tar.gz /home
查看進程
以csm使用者登陸CBM伺服器,停止服務,執行以下命令查看進程
#ps –ef|grep csm | grep tomcat
使用下面命令停止服務進行:
#kill -9線程號
重新命名
mv new.c new0.c 
起資料庫
登入到oracle:如果不知道Oracle密碼,先登入到root再登入到Oracle
執行下面命令
1.sqlplus "/as sysdba"
2.startup
3.exit
4.lsnrctl status
5.lsnrctl start

查看連接埠號碼7080是否被佔用

netstat -anp | grep 7080

如果被佔用,殺進程ID,kill -9 31285

刷資料庫mysql

# su – mysql

mysql linux > mysql –uroot –phuawei

mysql > source /home/qzz/sql/portal/poral.sql

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.