zoukankan      html  css  js  c++  java
  • 初玩Linux部署项目

    1,先安装虚拟机
    2,安装centOS
    3,安装mysql

    安装mysql客户端:
    yum install mysql

    安装mysql 服务器端:
    yum install mysql-server

    yum install mysql-devel

    启动mysql服务:
    service mysqld start

    登录:
    mysql -u root -p输入密码即可。
    忘记密码:
    service mysqld stop

    mysqld_safe --user=root --skip-grant-tables

    mysql -u root

    use mysql

    update user set password=password("new_pass") where user="root";

    flush privileges;


    开机启动:
    chkconfig -add mysqld,查看开机启动设置是否成功chkconfig --list | grep mysql*

    数据库字符集设置
    mysql配置文件/etc/my.cnf中加入default-character-set=utf8;

    用SQLyog(海豚)工具连,会发现连不上,执行

    update user set host='%' where user='root' and host='localhost';

    ok!!!



    4,如果要用WinSCP进行文件传送
    或putty_连接linux,
    要先开ssh服务
    并且把防火墙关掉。

    service sshd start

    service iptables stop
    (打开iptables的配置文件:vi /etc/sysconfig/iptables)

    5,远程连接mysql
    GRANT ALL PRIVILEGES ON *.* TO 'root2'@'%'IDENTIFIED BY 'root2' WITH GRANT OPTION;
    commit;


    6,用yum安装jdk
    yum -y install java-1.6.0-openjdk*

    7,放tomcat(把文件的所有权限勾上)


    然后至bin路径下,sh startup.sh 或者 ./startup.sh 启动

    tail -f ../logs/catalina.out

    8,关tomcat(直接杀进程)

    ps -ef | grep tomcat
    kill -9 11111

    9,别的ip访问你的(局域网)

    先设备桥接

    vi /etc/sysconfig/network-scripts/ifcfg-eth0
    IPADDR=192.168.0.10
    NETMASK=255.255.255.0
    GATEWAY=192.168.0.1

    搞定!

    下面是Seafile的运用,一种云存储;

    下面是官网的安装说明。

    http://manual-cn.seafile.com/deploy/using_mysql.html

  • 相关阅读:
    23. call和apply和bind的区别
    22.call方法的深入
    21.函数的三种角色
    20.原型深入
    2.9 原型链综合复习参考
    2.8深入扩展原型链模式常用的六种继承方式
    2.7原型链模式扩展-批量设置公有属性
    php数组函数有哪些操作?php数组函数的应用
    PHP常见的一些问题总结(收藏)
    yii框架 隐藏index.php 以及美化URL(pathinfo模式访问)
  • 原文地址:https://www.cnblogs.com/xiexy/p/4081326.html
Copyright © 2011-2022 走看看