国产精品chinese,色综合天天综合精品网国产在线,成午夜免费视频在线观看,清纯女学生被强行糟蹋小说

    <td id="ojr13"><tr id="ojr13"><label id="ojr13"></label></tr></td>
        • <source id="ojr13"></source>
            <td id="ojr13"><ins id="ojr13"><label id="ojr13"></label></ins></td>

            Article / 文章中心

            linux下配置mysql 以及 linux下開啟守護(hù)進(jìn)程

            發(fā)布時(shí)間:2021-12-06 點(diǎn)擊數(shù):675

            linux下mysql的安裝配置

            更新數(shù)據(jù)源

            sudo apt-get update sudo apt-get upgrade


            安裝mysql

            sudo apt-get install mysql-server


            啟動(dòng)mysql

            service mysql start


            進(jìn)入mysql

            sudo mysql


            更改mysql權(quán)限

            mysql> use mysql; mysql> UPDATE mysql.user SET authentication_string=password('你想設(shè)置的密碼') WHERE User='root' AND Host ='localhost'; mysql> UPDATE user SET plugin="mysql_native_password"; mysql> flush privileges; mysql> exit;

            重新嘗試進(jìn)入mysql


            mysql -u root -p

            輸入密碼就可以了。


            linux下配置守護(hù)進(jìn)程服務(wù)

            編寫腳本文件

            進(jìn)入服務(wù)路徑


            cd /etc/systemd/system

            然后進(jìn)行一個(gè)腳本的編寫

            比如一個(gè) helloworld.service

            sudo vim helloworld.service


            填寫以下內(nèi)容


            [Unit] Description = OA-System After = network.target  [Service] ExecStart=/home/ubuntu/hello/main  # 這里main就是你的二進(jìn)制執(zhí)行文件 ExecReload=/home/ubuntu/hello/main WorkingDirectory=/home/ubuntu/hello StandardOutput = inherit StandardError = inherit Restart=always  [Install] WantedBy=default.target


            運(yùn)行

            sudo systemcli enable oa.service  # 允許開機(jī)自啟 sudo systemcli start oa.service # 守護(hù)進(jìn)程的方式啟動(dòng)