Linux 無法正常開機,出現錯誤訊息:

Checking filesystems
/dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
         (i.e., without -a or -p options)
                                                  [FAILED]

benson82208 發表在 痞客邦 留言(0) 人氣()

備份整顆硬碟

/dev/sda所有的資料寫入/dev/sdb

sudo dd if=/dev/sda of=/dev/sdb

if參數指定的是輸入檔案(input file),而of參數指定的是輸出檔案(output file),這行指令會將/dev/sda這顆硬碟的資料讀出來,然後寫進/dev/sdb這顆硬碟。

在整個過程中如果出現讀取錯誤的話,dd就會停止執行,如果想要讓dd在出現讀取錯誤時還是繼續拷貝資料的話,就要加上conv=noerror參數,這個選項通常在備份資料時會使用到,另外加上sync可以讓dd以 synchronized I/O 的方式備份資料:

benson82208 發表在 痞客邦 留言(0) 人氣()

Linux服务器下面的MySQL需要定期的维护,就需要掌握一些常见的命令,MySQL启动、停止MySQL、重启MySQL等是每个拥有独立主机的站长必须要撑握的操作,下面为大家简单介绍一下操作方法:

一、MySQL启动方式

1、使用 service 启动:service mysqld start
2、使用 mysqld 脚本启动:/etc/init.d/mysqld start
3、使用 safe_mysqld 启动:safe_mysqld&

benson82208 發表在 痞客邦 留言(0) 人氣()


首先通過chkconfig命令看看MySQL在不在可管理的清單中,命令是︰

chkconfig --list如果清單中沒有mysqld這個,需要先用這個命令添加︰

chkconfig add mysqld

然後用這個命令設定開機啟動︰

chkconfig mysqld on

benson82208 發表在 痞客邦 留言(0) 人氣()

CentOS-Mysql-Access denied for user root

在CentOS(64bit)平台,無法使用root用戶進行登錄;


mysql -u root -p


ERROR 1045(28000): Access denied for user 'root'@'localhost'(using password: YES)


方法/步驟

benson82208 發表在 痞客邦 留言(0) 人氣()

1. 命令提示字元視窗中,輸入「net Stop w32time」指令,並按一下鍵盤上「Enter」按鍵。   

2.  接著輸入「w32tm /Register」指令,並按一下鍵盤上「Enter」按鍵;看到顯示「W32Time 已登錄成功。

3. 最後我們要還原「日期和時間」服務,所以繼續輸入「net Start w32time」指令,一樣按一下鍵盤上「Enter」按鍵;看到顯示為「Windows Time 服務已經啟動成功」即可關閉命令提示字元視窗。

這樣問題就可以解決了。

benson82208 發表在 痞客邦 留言(0) 人氣()

How to install VMware tools on FreeBSD server

FreeBSD is my favorite operating system. All my FreeBSD servers (except embedded systems on physical micro computers) are running as virtual machines. FreeBSD is officially supported GuestOS by VMware so nothing stops to virtualize FreeBSD even for productional use.
VMware Tools is a suite of utilities that enhances the performance of the virtual machine's guest operating system and improves management of the virtual machine. Although the guest operating system can run without VMware Tools, you would lose important functionality and convenience. In other words, VMware tools are not necessary but highly recommended to use on virtual machines running on top of VMware ESXi hosts.
There are multiple options how to install VMware tools on FreeBSD but I personally useOpen VM Tools native FreeBSD package as using Open VM Tools is actually the latest VMware's recommendation for unix like systems which is the case of FreeBSD. The reason why I use Open VM Tools instead of VMtools delivered by VMware on ESXi hosts or VMware download site is that I can use default FreeBSD package management system (pkg) for simple deployment. It is fast, convenient and fully integrated with standard operating system update and upgrade procedures.
As you can see below, the installation on FreeBSD 10.x and above is very straight forward. Essentially, the single command and 5 lines in FreeBSD system config file.

benson82208 發表在 痞客邦 留言(0) 人氣()

1. 首先 輸入 「Regedit」

2. 找到 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP–Tcp\PortNumber  

3.開啟修改視窗後,請先點選「十進位」,然後在「數值資料」處輸入新的連接埠編號,如「1234」,最後再按下「確定」。修改完後,請關閉登錄檔編輯器再讓電腦重開機即可生效。

這裡要記往 當開啟遠端桌面時連線要輸入

例如: 172.16.0.1:1234 

benson82208 發表在 痞客邦 留言(0) 人氣()

解法方法:

原來是不小心重覆啟動二次 

先看看 /etc/rc.conf 

sshd_enable="YES" (或者 sshd2_enable="YES" ,視你安裝的 sshd 而定) 以及 inetd_enable="YES" 

看到sshd-跟inetd都被enable起來

benson82208 發表在 痞客邦 留言(0) 人氣()

首頁能夠顯示,說明數據的Drupal已經安裝完成,能夠運行了,但為什麼其他頁面都會出錯呢?這是因為Drupal 8默認開啟了簡潔鏈接,需要服務器的rewrite功能支持。但因為各種原因服務器的url重寫功能沒有啟用或者配置錯誤導致Drupal 8出錯。那麼如何解決呢?

2.需要確認的.htaccess文件裡有關rewirte的模塊開啟。

  1. <IfModule mod_rewrite.c>

  2.   RewriteEngine on

benson82208 發表在 痞客邦 留言(0) 人氣()

1.查看有那一些apache版本

pkg search apache  

2.安裝 最新apache 

pkg install apache24  

改 /etc/rc.conf 文件,加入 apache24_enable=”YES” 这一行

benson82208 發表在 痞客邦 留言(0) 人氣()


控制台\網路和網際網路\網路和共用中心\進階共用設定  

把下面設定都打開-> 注意有一個 以密碼保護的共用 一定要關閉

如果還是不行就在安全性把Everyone 權限加入套用就可以成功了

benson82208 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。