首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > VSTS >

ubuntu应用总结-ubuntu搭建mysql,tomcat,vsftp

2012-07-04 
ubuntu使用总结--ubuntu搭建mysql,tomcat,vsftp1.语法ls -al 列出文件信息ls -f ?可以为不同文件显示不同

ubuntu使用总结--ubuntu搭建mysql,tomcat,vsftp

1.语法

ls -al 列出文件信息

ls -f ?可以为不同文件显示不同的颜色

find ?dir -name ?fileName 查找文件

查找命令 | grep 文件名 ? 过滤文件

grep -n '字符串' fileName 查找出包含指定字符串的文件

?

rm -rf dir ?删除目录及其文件

cp -ax dir destinationDir ?复制目录及其文件

gcc|g++ test.cpp -o test 编译c,c++文件

pwd 显示当前目录print work dir

whoami 当前的用户

cat fileName 查看文件

cat -b file 可以显示出文件的行数

vim file Row G 查找文件的某行

more fileName 分页显示文件

/etc/init.d/目录下放得都是快捷图标

?

2.安装mysql?

sudo apt-get install mysql-server mysql-client

mysql -u root -p 刚开始登录mysql

use mysql 使用数据库名称mysql的数据库

?

赋予远程登录权限以便navicat操作

grant all on *.* to 'root'@'%' identified by '000000'?

修改配置/ect/mysql/my.cnf文件中的bind-address=127.0.0.1改成0.0.0.0

?

重启mysql

sudo /ect/init.d/mysql start/restart/shutdown/status

注意服务器上应用程序连接mysql时候用户名和密码和localhost中相同,而不是远程的用户名和密码。

?

3.安装tomcat

直接从官网上下载解压后移动到自己喜欢的目录直接启动即可和windows中类似。

sudo /opt/tomcat7/bin/startup.sh start/restart/stop/status

?

4.安装vsftpd

sudo apt-get install vsftpd

取消配置/ect/vsftpd.conf文件中的注释并修改成

chroot_local_use=yes

chroot_list_enable=yes

chroot_list_file=/etc/vsftpd/chroot_list

同时创建vsftpd目录和chroot_list文件

?

增加组groupadd ftpgroup

增加成员useradd -g ftpgroup -d /home/long/ftp -M ftpuser password ftpuser mypassword

?

编辑chroot_list文件

将用户名添加进去 一个用户名一行

重新启动ftp即可

?

在浏览器中输入ftp://account:password@ip

?

?

?

?

热点排行