當前位置:首頁 » 雲伺服器 » linux搭建m2m伺服器

linux搭建m2m伺服器

發布時間: 2022-12-06 14:36:40

A. 如何搭建linux伺服器

如何搭建linux的伺服器?我們一起來了解一下吧。
1、瀏覽器搜索Nginx下載Nginx軟體包,

2、安裝Nginx之前需要安裝Nginx所需要的依賴包,使用命令如下:
$-devzlib1g-devopenssllibssl-dev

3、解壓Nginx軟體包,Nginx的解壓使用如下命令:
$tarzxvfnginx-1.17.8.tar.gz

4、配置Nginx,Nginx的配置主要是安裝之前配置Nginx的安裝路徑,啟用和禁用Nginx的某些模塊。所以,Nginx的配置是很重要的一個步驟。具體使用的命令如下:
$cdnginx-1.17.8/
$./configure--prefix=/usr/local/nginx


5、對Nginx進行編譯與安裝,具體的使用如下的命令:
$cdnginx-1.17.8/
$make&&makeinstall


6、啟動伺服器
$sudo/usr/local/nginx/sbin/nginx

在瀏覽器中輸入http://192.168.221.123

本文章基於ThinkpadE15品牌、centos7系統撰寫的。

B. Linux伺服器搭建實戰詳解的目錄

第1章 Linux系統概述 1
1.1 Linux的發展 1
1.2 Linux常見版本 2
1.2.1 Red Hat Linux 2
1.2.2 Debian Linux 2
1.2.3 Ubuntu Linux 3
1.3 Linux操作系統 3
1.3.1 Linux操作系統結構 3
1.3.2 Linux操作系統特點 5
1.3.3 Linux操作系統的應用領域 6
1.3.4 Red Hat Enterprise Linux 5 7
1.4 Red Hat Enterprise Linux 5的兩個版本 8
1.5 安裝和管理Red Hat Enterprise Linux 8
1.5.1 安裝前的准備 8
1.5.2 與其他操作系統並存的問題 10
1.5.3 Red Hat Enterprise Linux的安裝階段 11
1.6 Linux操作系統的引導與登錄 19
1.6.1 多系統引導管理器——GRUB及LILO 19
1.6.2 Linux的啟動過程 20
1.6.3 Linux的關閉與重新引導 20
1.6.4 Linux系統的登錄和退出 20
1.7 GNOME和KDE桌面管理器 22
1.7.1 GNOME桌面環境 23
1.7.2 KDE桌面環境 31
1.7.3 定製自己的桌面 42
第2章 ftp伺服器 45
2.1 FTP服務簡介 45
2.1.1 FTP工作原理 45
2.1.2 匿名用戶訪問的產生 46
2.1.3 FTP服務的連接模式 46
2.1.4 幾種流行的FTP伺服器軟體 48
2.2 安裝vsFTPd服務 49
2.2.1 安裝vsFTPd軟體 49
2.2.2 FTP服務的啟動與關閉 50
2.3 vsFTPd的相關配置 52
2.3.1 配置匿名用戶登錄環境 53
2.3.2 監聽地址與控制埠 53
2.3.3 FTP模式與數據埠 54
2.3.4 ASCII模式 55
2.3.5 超時選項 55
2.3.6 負載控制 55
2.3.7 用戶設置 56
2.3.8 用戶登錄控制 57
2.3.9 目錄訪問控制 57
2.3.10 文件操作控制 58
2.3.11 新增文件許可權設置 58
2.3.12 日誌設置 58
2.4 安裝與配置PureFTPD伺服器的 59
2.4.1 安裝Apache服務 59
2.4.2 安裝Mysql資料庫 61
2.4.3 安裝PureFTPD 62
2.4.4 生成PureFTPD服務管理腳本 64
2.4.5 配置匿名用戶登錄環境 64
2.4.6 安裝Zend Optimizer 65
2.4.7 WebPureFTP的安裝與配置 66
2.4.8 生成MySQL資料庫 67
2.4.9 生成pure-ftpd資料庫配置文件 68
2.4.10 使用webpureftp管理虛擬用戶 68
2.5 FTP伺服器的訪問 69
2.5.1 Linux環境下訪問FTP伺服器 69
2.5.2 Windows環境下訪問FTP伺服器 70
第3章 電子郵件伺服器 71
3.1 電子郵件服務概述 71
3.1.1 電子郵件服務簡介 71
3.1.2 郵件專有名詞解釋 72
3.1.3 POP3與SMTP協議 73
3.2 Postfix郵件伺服器 74
3.2.1 安裝Postfix郵件伺服器 74
3.2.2 Postfix配置文件 76
3.2.3 Postfix基本配置 77
3.2.4 虛擬別名域 80
3.2.5 用戶別名 80
3.2.6 SMTP認證 81
3.2.7 啟動和停止Postfix服務 83
3.2.8 配置與訪問電子郵件客戶端 84
3.3 POP和IMAP郵件服務 87
3.3.1 dovecot服務 87
3.3.2 CyrusImapd服務 88
3.4 Web支持電子郵件 92
3.4.1 Squirrelmail的安裝與配置 92
3.4.2 登錄Squirrelmail 94
第4章 Web伺服器 95
4.1 Web概述 95
4.1.1 Web服務簡介 95
4.1.2 HTTP協議簡介 96
4.1.3 Web伺服器軟體 99
4.2 Apache概述 99
4.2.1 Apache的誕生 100
4.2.2 安裝Apache服務 101
4.3 啟動與停止Apache服務 103
4.4 Apache服務的基本配置方法 106
4.4.1 httpd.conf配置文件 106
4.4.2 Apache服務主配置文件的構成 107
4.5 Apache伺服器控制存取的方式 112
4.5.1 Options選項 113
4.5.2 瀏覽許可權的設置 113
4.6 Apache服務的高級配置 116
4.6.1 虛擬目錄簡介 116
4.6.2 配置與管理虛擬主機 117
4.6.3 用戶認證和授權 119
4.6.4 配置SSI 123
4.6.5 MIME類型簡介 124
4.7 創建並配置動態網站 124
4.7.1 創建並配置JSP動態網站 124
4.7.2 創建並配置CGI動態網站 131
第5章 DHCP伺服器 133
5.1 DHCP服務概述 133
5.1.1 DHCP服務的實現原理 133
5.1.2 IP地址租約和更新 134
5.1.3 DHCP伺服器分配的IP地址類型 135
5.2 安裝DHCP服務 137
5.2.1 做好DHCP伺服器安裝前的准備 137
5.2.2 安裝DHCP服務的方法 138
5.2.3 啟動及停止DHCP服務 141
5.3 配置DHCP服務 142
5.3.1 DHCP配置文件及格式 142
5.3.2 配置IP作用域 145
5.3.3 配置客戶機的IP 選項 146
5.3.4 設置租約期限 147
5.3.5 保留特定的IP地址 147
5.3.6 多網段的IP地址的分配 148
5.3.7 DHCP伺服器配置實例 149
5.4 配置DHCP客戶機 150
5.4.1 以Linux操作系統作為客戶端配置 150
5.4.2 以Windows操作系統作為客戶端配置 152
第6章 DNS伺服器 155
6.1 DNS服務概述 155
6.1.1 DNS服務簡介 155
6.1.2 DNS提供的服務 156
6.1.3 DNS查詢原理和規劃 156
6.1.4 DNS域名解析 158
6.2 DNS服務的安裝 158
6.2.1 安裝DNS服務 159
6.2.2 安裝Chroot軟體包 159
6.2.3 DNS服務的啟動與停止 160
6.3 配置主要名稱伺服器 161
6.3.1 主配置文件 161
6.3.2 設置根區域和主區域 162
6.3.3 設置反向解析區域 165
6.3.4 根伺服器信息文件 166
6.3.5 區域文件 166
6.3.6 反向解析區域文件 169
6.3.7 功能實現 170
6.3.8 測試DNS伺服器 170
6.4 配置輔助DNS伺服器 174
6.5 配置緩存Cache-only伺服器 175
6.6 DNS客戶端的配置 176
6.6.1 在Linux下配置DNS客戶端 176
6.6.2 在Windows下配置DNS客戶端 177
第7章 代理伺服器 179
7.1 代理伺服器概述 179
7.1.1 代理伺服器的工作流程 179
7.1.2 代理伺服器的作用及相關應用 180
7.2 安裝Squid Server 181
7.2.1 Squid簡介 181
7.2.2 Squid Server的安裝 182
7.3 Squid Server的基本配置 184
7.3.1 設置監聽的IP和埠 184
7.3.2 設置緩存大小 184
7.3.3 訪問控制設置 186
7.3.4 指定Squid可以使用內存的理想值 188
7.3.5 其他參數設置 188
7.3.6 設置錯誤提示為中文 189
7.3.7 初始化Squid Server 189
7.4 啟動與停止代理伺服器 192
7.4.1 設置Squid服務隨系統的啟動而自動啟動 193
7.4.2 重新載入配置文件 195
7.5 Squid Server高級配置 195
7.5.1 實現透明代理 195
7.5.2 Squid安全設置 197
7.5.3 Squid外部程序支持選項 199
7.6 Squid日誌管理 199
7.6.1 日誌選項 199
7.6.2 Squid代理伺服器日誌系統的構成 199
7.6.3 日誌及流量分析軟體——Webalizer 200
7.6.4 Webalizer軟體的應用 204
7.7 不同環境下的代理客戶端的配置 205
7.7.1 Linux系統下Firefox代理設置 205
7.7.2 Windows系統下IE代理配置 207
第8章 Samba伺服器 209
8.1 Samba服務概述 209
8.1.1 Samba服務簡介 209
8.1.2 Samba服務的安裝 209
8.1.3 Samba服務的圖形化配置方法 212
8.1.4 啟動、停止和重啟Samba服務 216
8.2 Samba服務的配置文件 216
8.2.1 Samba服務的主要配置文件 217
8.2.2 Samba服務的密碼文件 217
8.2.3 Samba服務的日誌文件 218
8.3 smb.conf文件詳解 218
8.3.1 smb.conf文件結構 219
8.3.2 smb.conf文件的語法和變數 220
8.3.3 smb.conf文件詳解 220
8.3.4 smb.conf文件中的段 223
8.3.5 Samba服務具體參數設置 223
8.4 Samba服務功能實現 225
8.4.1 指定Samba所要加入的工作組 225
8.4.2 注釋說明伺服器 226
8.4.3 限制可訪問伺服器IP地址的范圍 226
8.4.4 列印機設置 227
8.4.5 設置guest賬號匿名登錄 228
8.4.6 設置日誌文件名、存放路徑及大小 228
8.4.7 伺服器安全設置 229
8.4.8 具體的共享設置 232
8.5 共享的資源訪問 234
8.5.1 不同客戶端主機的資源訪問 234
8.5.2 本機Windows分區和Linux分區的資源互訪 235
第9章 NFS伺服器 237
9.1 NFS服務簡介 237
9.1.1 使用NFS的優勢 237
9.1.2 NFS服務的組件 238
9.2 RPC簡介 238
9.3 安裝並配置NFS服務 239
9.3.1 安裝NFS服務 239
9.3.2 配置NFS服務 240
9.3.3 NFS文件的存取許可權 242
9.4 啟動與停止NFS服務 243
9.5 在客戶端掛載NFS文件系統 244
9.5.1 查看NFS伺服器信息 244
9.5.2 載入NFS伺服器共享目錄 245
9.5.3 自動掛接NFS文件系統 246
第10章 LDAP目錄服務 247
10.1 目錄服務概述 247
10.1.1 X.500簡介 247
10.1.2 初識LDAP 248
10.1.3 X.500與LDAP 251
10.1.4 流行的目錄服務產品 252
10.2 深入認識LDAP 254
10.2.1 LDAP的幾種基本模型 254
10.2.2 如何規劃目錄樹 256
10.2.3 LDAP的應用領域 257
10.3 安裝LDAP 257
10.3.1 安裝Berkeley DB 257
10.3.2 安裝OpenLDAP 260
10.4 配置OpenLDAP 261
10.4.1 OpenLDAP的基本配置 261
10.4.2 啟動OpenLDAP伺服器 262
10.5 為OpenLDAP建立初始化數據 263
10.6 LDAP圖形界面管理工具簡介 264
10.6.1 主要的LDAP圖形界面管理工具 264
10.6.2 安裝phpLDAPadmin 266
10.7 配置phpLDAPadmin 268
10.7.1 生成phpLDAPadmin主配置文件 268
10.7.2 phpLDAPadmin的基本配置 268
10.8 使用OpenLDAPadmin管理目錄樹 271
10.8.1 進入phpLDAPadmin 271
10.8.2 創建組織單元 272
10.8.3 創建用戶組 274
10.8.4 創建用戶賬號 276
10.9 實現LDAP服務的身份驗證 277
10.9.1 實現Linux系統用戶驗證 277
10.9.2 實現FTP用戶驗證 279
10.9.3 實現Web用戶驗證 280
第11章 SSH伺服器 281
11.1 SSH服務概述 281
11.1.1 SSH服務簡介 281
11.1.2 公鑰加密體系結構 282
11.2 SSH服務的安裝 283
11.3 配置SSH伺服器 283
11.4 SSH服務的啟動和停止 286
11.4.1 啟動SSH服務 286
11.4.2 重啟SSH服務 287
11.4.3 自動啟動SSH服務 287
11.4.4 停止SSH服務 288
11.5 使用SSH客戶端 288
11.5.1 SSH客戶端在Windows平台下的使用 288
11.5.2 SSH客戶端在Linux平台下的使用 289
第12章 MySQL資料庫的配置 293
12.1 MySQL概述 293
12.1.1 MySQL簡介 293
12.1.2 MySQL的應用領域 294
12.2 安裝MySQL 295
12.2.1 安裝前的准備 295
12.2.2 MySQL的具體安裝過程 295
12.3 啟動與停止MySQLD服務 298
12.4 配置及使用MySQL服務 298
12.4.1 修改MySQL管理員的口令 299
12.4.2 MySQL資料庫的創建和使用 299
12.4.3 MySQL數據表的創建和使用 300
12.4.4 索引的創建和刪除 304
12.4.5 用戶的創建和刪除 305
12.4.6 用戶許可權的設置 306
12.5 圖形化配置MySQL 309
12.5.1 安裝phpMyAdmin 309
12.5.2 配置phpMyAdmin虛擬目錄 310
12.5.3 使用phpMyAdmin 311
第13章 使用Webmin配置各種服務 313
13.1 Webmin的概述 313
13.1.1 Webmin簡介 313
13.1.2 Webmin特性 313
13.1.3 Webmin主要功能 314
13.2 安裝和配置Webmin 317
13.2.1 Perl語言解釋器的安裝 318
13.2.2 Net-SSLeay perl和OpenSSL的安裝 318
13.2.3 安裝與訪問Webmin 319
13.2.4 設置Webmin為中文界面 321
13.2.5 停止和啟動Webmin服務 322
13.3 用Webmin配置服務 323
13.3.1 Samba服務的配置 323
13.3.2 NFS服務的配置 327
13.3.3 DNS服務的配置 328
13.3.4 Web服務的配置 331
13.3.5 網路防火牆與NAT服務配置 336
13.3.6 代理服務配置 342
13.3.7 SSH服務的配置 349
第14章 Linux命令行 351
14.1 Linux Shell概述 351
14.1.1 Linux Shell簡介 351
14.1.2 系統默認Shell——Bash Shell 351
14.1.3 設置使用其他Shell 352
14.2 啟動Shell 353
14.2.1 終端啟動Shell 353
14.2.2 直接啟用Shell 354
14.2.3 直接啟動命令行窗口 354
14.3 Shell指令詳解 355
14.3.1 目錄及文件管理指令 355
14.3.2 信息顯示指令 360
14.3.3 網路基本配置指令 363
14.3.4 關機和注銷指令 366
14.4 配置Shell環境 367
14.4.1 Shell環境變數 367
14.4.2 環境變數設置 369
14.4.3 Shell環境配置文件 370
14.5 使用vim文本編輯器 371
14.5.1 vim編輯器簡介 371
14.5.2 常用vim指令 372
14.5.3 vim的定製 376
第15章 Linux操作系統中的 網路連通性測試 377
15.1 網路線路的連通性測試 377
15.1.1 雙絞線的線芯 377
15.1.2 測試直通雙絞線 378
15.1.3 測試交叉雙絞線 378
15.1.4 利用ping命令測試網路連通性 379
15.2 路由跟蹤 382
15.2.1 traceroute命令 382
15.2.2 traceroute顯示代碼 383
15.2.3 traceroute命令選項的應用 384
15.3 Linux圖形界面下測試網路 386
15.3.1 進入「Network Tools」窗口 386
15.3.2 網路設備查詢 387
15.3.3 網路連通性測試 387
15.3.4 網路信息統計 388
15.3.5 網路路由跟蹤 388
15.3.6 網路埠掃描 389
15.3.7 網路查閱 389
15.3.8 查詢登錄用戶的信息 390
15.3.9 域名查詢工具 390
第16章 Linux網路管理 391
16.1 靜態IP地址管理工具 391
16.1.1 IP地址 391
16.1.2 子網掩碼 392
16.1.3 TCP/IP配置文件 392
16.1.4 在圖形界面下配置乙太網絡 392
16.1.5 在命令模式下配置乙太網 397
16.2 動態IP地址分配工具 400
16.2.1 獲取動態IP地址 400
16.2.2 安裝DHCP服務 401
16.2.3 DHCP服務的啟動與停止 404
16.2.4 DHCP服務的配置 405
16.3 網路地址表管理工具 407
16.3.1 顯示ARP緩存 407
16.3.2 管理ARP緩存 408
第17章 軟體基礎管理 409
17.1 Kickstart簡介 409
17.1.1 安裝Kickstart 409
17.1.2 Debian/Ubuntu的自動化安裝 419
17.2 Linux操作系統中的軟體包管理 420
17.2.1 RPM簡介 420
17.2.2 RPM軟體包管理系統的應用 423
17.3 Debian的軟體包管理系統 434
17.3.1 DPKG簡介 434
17.3.2 DPKG軟體包管理系統應用 435
第18章 軟體包高級管理 441
18.1 APT——高級軟體包管理 441
18.1.1 APT概述 441
18.1.2 應用APT軟體包管理系統 442
18.2 YUM——智能化的RPM軟體包管理 452
18.2.1 YUM概述 452
18.2.2 應用YUM軟體包管理系統 453
18.3 Linux內核的升級 462
18.3.1 獲取內核源代碼 463
18.3.2 配置內核 464
18.3.3 編譯內核 467
18.3.4 安裝內核 469
第19章 用戶和進程管理 471
19.1 用戶管理 471
19.1.1 用戶賬號文件 471
19.1.2 用戶群組文件 474
19.1.3 命令行方式的用戶管理 476
19.1.4 圖形界面方式的用戶管理 486
19.1.5 命令行方式的群組管理 486
19.2 進程管理 490
19.2.1 進程及作業 490
19.2.2 進程式控制制 490
19.2.3 作業控制 494
第20章 管理Linux文件系統及磁碟 497
20.1 管理Linux文件系統 497
20.1.1 Linux文件系統結構 497
20.1.2 常見的文件系統 497
20.1.3 文件類型 498
20.1.4 文件壓縮與歸檔 498
20.1.5 文件鏈接 503
20.1.6 安裝文件系統 505
20.2 磁碟管理 507
20.2.1 硬碟簡介 507
20.2.2 管理磁碟分區 509
20.2.3 使用磁碟管理命令 529
20.2.4 磁碟配額管理問題 539
第21章 Linux系統安全 549
21.1 系統安全基礎設置 549
21.1.1 BIOS安全 549
21.1.2 賬號安全 549
21.2 系統安全高級設置 552
21.2.1 重要文件 552
21.2.2 防止攻擊系統 553
21.2.3 開啟安全服務 555
21.2.4 審計日誌 556
21.2.5 文件和目錄許可 558

C. 如何把自己的linux做成伺服器

以架設WEB伺服器為例:
1,架設linux環境的伺服器運行環境,如PHP+MYSQL和支持靜態網頁的伺服器。
2,添加對應的資料庫,PHP網頁。
3,用區域網的電腦打開對應的IP地址,瀏覽成功,WEB伺服器建設成功。
4,如果要提供互聯網服務,還需要申請固定IP地址,域名申請,域名備案,IDC備案,域名指向等相應工作。

D. 如何在Linux操作系統下搭建配置流媒體伺服器系統

在Linux操作系統下搭建配置流媒體伺服器系統方法詳見:https://jingyan..com/article/0eb457e5c8f69303f1a905b3.html

E. 如何最快搭建LINUX伺服器集群

1.2.並行技術
這是一個非常簡單的建造四節點的小集群系統的例子,它是構建在Linux操作系統上,通過MPICH軟體包實現的,希望這個小例子能讓大家對集群系統的構建有一個最基本的了解。
2.使用MPICH構建一個四節點的集群系統
這是一個非常簡單的建造四節點的小集群系統的例子,它是構建在Linux操作系統上,通過MPICH軟體包實現的,希望這個小例子能讓大家對集群系統的構建有一個最基本的了解。
2.1 所需設備
1).4台採用Pentium II處理器的PC機,每台配
置64M內存,2GB以上的硬碟,和EIDE介面的光碟驅動器。
2).5塊100M快速乙太網卡,如SMC 9332 EtherPower 10/100(其中四塊卡用於連接集群中的結點,另外一塊用於將集群中的其中的一個節點與其它網路連接。)
3).5根足夠連接集群系統中每個節點的,使用5類非屏蔽雙絞線製作的RJ45纜線
4).1個快速乙太網(100BASE-Tx)的集線器或交換機
5).1張Linux安裝盤
2.2 構建說明
對計算機硬體不熟的人,實施以下這些構建步驟會感到吃力。如果是這樣,請找一些有經驗的專業人士尋求幫助。
1. 准備好要使用的採用Pentium II處理器的PC機。確信所有的PC機都還沒有接上電源,打開PC機的機箱,在准備與網路上的其它設備連接的PC機上安裝上兩塊快速乙太網卡,在其它的 PC機上安裝上一塊快速乙太網卡。當然別忘了要加上附加的內存。確定完成後蓋上機箱,接上電源。
2. 使用4根RJ45線纜將四台PC機連到快速乙太網的集線器或交換機上。使用剩下的1根RJ45線將額外的乙太網卡(用於與其它網路相連的那塊,這樣機構就可以用上集群)連接到機構的區域網上(假定你的機構區域網也是快速乙太網),然後打開電源。
3. 使用LINUX安裝盤在每一台PC機上安裝。請確信在LINUX系統中安裝了C編譯器和C的LIB庫。當你配置TCP/IP時,建議你為四台PC分別指定為192.168.1.1、192.168.1.2、192.168.1.3、192.168.1.4。第一台PC為你的伺服器節點(擁有兩塊網卡的那台)。在這個伺服器節點上的那塊與機構區域網相連的網卡,你應該為其指定一個與機構區域網吻合的IP地址。
4.當所有PC都裝好Linux系統後,編輯每台機器的/etc/hosts文件,讓其包含以下幾行:
192.168.1.1 node1 server
192.168.1.2 node2
192.168.1.3 node3
192.168.1.4 node4
編輯每台機器的/etc/hosts.equiv文件,使其包含以下幾行:
node1
node2
node3
node4
$p#
以下的這些配置是為了讓其能使用MPICH』s p4策略去執行分布式的並行處理應用。
1. 在伺服器節點
,建一個/mirror目錄,並將其配置成為NFS伺服器,並在/etc/exports文件中增加一行:
/mirror node1(rw) node2(rw) node3(rw) node4(rw)
2. 在其他節點上,也建一個/mirror目錄,關在/etc/fstab文件中增加一行:
server:/mirror /mirror nfs rw,bg,soft 0 0
3. /mirror這個目錄從伺服器上輸出,裝載在各個客戶端,以便在各個節點間進行軟體任務的分發。
4. 在伺服器節點上,安裝MPICH。MPICH的文檔可在
5.任何一個集群用戶(你必須在每一個節點新建一個相同的用戶),必須在/mirror目錄下建一個屬於它的子目錄,如 /mirror/username,用來存放MPI程序和共享數據文件。這種情況,用戶僅僅需要在伺服器節點上編譯MPI程序,然後將編譯後的程序拷貝到在/mirror目錄下屬於它的的子目錄中,然後從他在/mirror目錄下屬於它的的子目錄下使用p4 MPI策略運行MPI程序。
2.3 MPICH安裝指南
1.如果你有gunzip,就d下載mpich.tar.gz,要不然就下載mpich.tar.Z。你可以到http://www.mcs.anl.gov/mpi/mpich/downloa下載,也可以使用匿名FTP到ftp.mcs.anl.gov的pub/mpi目錄拿。(如果你覺得這個東西太大,你可以到pub/mpi/mpisplit中取分隔成塊的幾個小包,然後用cat命令將它們合並)
2.解壓:gunzip ;c mpich.tar.gz tar xovf-(或zcat mpich.tar.Ztar xovf-)
3.進入mpich目錄
4.執行:./configure為MPICH選擇一套適合你的實際軟硬體環境的參數組,如果你對這些默認選擇的參數不滿意,可以自己進行配置(具體參見MPICH的配置文檔)。最好選擇一個指定的目錄來安裝和配置MPICH,例如:
./configure -prefix=/usr/local/mpich-1.2.0
5.執行:make >&make.log 這會花一段較長的時間,不同的硬體環境花的時間也就不同,可能從10分鍾到1個小時,甚至更多。
6.(可選)在工作站網路,或是一台單獨的工作站,編輯mpich/util/machines/machines.xxx(xxx是MPICH對你機器體系結構取的名稱,你能很容易的認出來)以反映你工作站的當地主機名。你完全可以跳過這一步。在集群中,這一步不需要。
7.(可選)編譯、運行一個簡單的測試程序:
cd examples/basic
make cpi
ln ;s ../../bin/mpirun mpirun
./mpirun ;np 4 cpi
此時,你就在你的系統上運行了一個MPI程序。
8.(可選)構建MPICH其餘的環境,為ch_p4策略使
用安全的服務會使得任何啟動速度加快,你可以執行以下命令構建:
make serv_p4
(serv_p4是一個較新的P4安全服務的版本,它包含在MPICH 1.2.0版中),nupshot程序是upshot程序的一個更快版本,但他需要tk 3.6版的源代碼。如果你有這個包,你就用以下命令可以構建它:
make nupshot
9.(可選)如果你想將MPICH安裝到一個公用的地方讓其它人使用它,你可以執行:
make install 或 bin/mpiinstall
你可以使用-prefix選項指定MPICH安裝目錄。安裝後將生成include、lib、bin、sbin、www和man目錄以及一個小小的示例目錄,
到此你可以通告所有的用戶如何編譯、執行一個MPI程序。

F. Linux如何搭建samba服務

主配置文件:

/etc/samba/smb.conf

#=================== Global Settings===============

[global]部分設置,主要就是下列幾項,其餘可以保持不變,當然你要比較復雜高級的功能服務的話,那就另當別論了;

# workgroup = NT-Domain-Name or Workgroup-Name

workgroup = MSHOME #主機所屬工作組名稱

# server string is the equivalent of the NT Description field

server string = Samba Server #SAMBA伺服器主機的注釋,可選,但是建議還是留著,而且盡量寫的詳細准確,有助於識別;

# Security mode. Most people will want user level security. See security_level.txt for details.

security = share #安全模式,由於是共享目錄,所以用share;

#==================== Share Definitions ==========

共享部分設置其它保存不動,直接在最後面添加你要共享的目錄即可,同時要注意其訪問許可權;

[nfs]

path = /var/nfs

public = yes

writable = yes

/var/nfs目錄對所有用戶都可讀可寫;

四、啟動服務

通過以上簡單的設置,重啟服務後,即可在Windows下在網上鄰居中進行訪問;

在FC5下,服務名為smb及nmb,啟動smb時自動將nmb也啟動;

五、注意事項

1、防火牆問題

2、確保共享目錄的訪問許可權

3、通過網上鄰居訪問相應共享目錄前,必須確保目錄在伺服器上存在。

範本:vi /etc/samba/smb.conf

# This is the main Samba configuration file. You should read the

# smb.conf(5) manual page in order to understand the options listed

# here. Samba has a huge number of configurable options (perhaps too

# many!) most of which are not shown in this example

#

# Any line which starts with a ; (semi-colon) or a # (hash)

# is a comment and is ignored. In this example we will use a #

# for commentry and a ; for parts of the config file that you

# may wish to enable

#

# NOTE: Whenever you modify this file you should run the command "testparm"

# to check that you have not made any basic syntactic errors.

#

#======================= Global Settings =====================================

[global]

# workgroup = NT-Domain-Name or Workgroup-Name

workgroup = WORKGROUP

netbios name = rayman_linux

# server string is the equivalent of the NT Description field

server string =Linux Samba Server TestServer

# This option is important for security. It allows you to restrict

# connections to machines which are on your local network. The

# following example restricts access to two C class networks and

# the "loopback" interface. For more examples of the syntax see

# the smb.conf man page

; hosts allow = 192.168.1. 192.168.2. 127.

# if you want to automatically load your printer list rather

# than setting them up indivially then you'll need this

printcap name = /etc/printcap

load printers = yes

# It should not be necessary to spell out the print system type unless

# yours is non-standard. Currently supported print systems include:

# bsd, sysv, plp, lprng, aix, hpux, qnx, cups

printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd

# otherwise the user "nobody" is used

guest account = detack

# this tells Samba to use a separate log file for each machine

# that connects

log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).

max log size = 0

# Security mode. Most people will want user level security. See

# security_level.txt for details.

security = share

# Use password server option only with security = server

# The argument list may include:

# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]

# or to auto-locate the domain controller/s

# password server = *

; password server = <NT-Server-Name>

# Password Level allows matching of _n_ characters of the password for

# all combinations of upper and lower case.

; password level = 8

; username level = 8

# You may wish to use password encryption. Please read

# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.

# Do not enable this option unless you have read those documents

encrypt passwords = yes

smb passwd file = /etc/samba/smbpasswd

# The following is needed to keep smbclient from spouting spurious errors

# when Samba is built with support for SSL.

; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt

# The following are needed to allow password changing from Windows to

# update the Linux system password also.

# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.

# NOTE2: You do NOT need these to allow workstations to change only

# the encrypted SMB passwords. They allow the Unix password

# to be kept in sync with the SMB password.

unix password sync = Yes

passwd program = /usr/bin/passwd %u

passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

# You can use PAM's password change control flag for Samba. If

# enabled, then PAM will be used for password changes when requested

# by an SMB client instead of the program listed in passwd program.

# It should be possible to enable this without changing your passwd

# chat parameter for most setups.

pam password change = yes

# Unix users can map to different SMB User names

; username map = /etc/samba/smbusers

# Using the following line enables you to customise your configuration

# on a per machine basis. The %m gets replaced with the netbios name

# of the machine that is connecting

; include = /etc/samba/smb.conf.%m

# This parameter will control whether or not Samba should obey PAM's

# account and session management directives. The default behavior is

# to use PAM for clear text authentication only and to ignore any

# account or session management. Note that Samba always ignores PAM

# for authentication in the case of encrypt passwords = yes

obey pam restrictions = yes

# Most people will find that this option gives better performance.

# See speed.txt and the manual pages for details

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces

# If you have multiple network interfaces then you must list them

# here. See the man page for details.

; interfaces = 192.168.12.2/24 192.168.13.2/24

# Configure remote browse list synchronisation here

# request announcement to, or browse list sync from:

# a specific host or from / to a whole subnet (see below)

; remote browse sync = 192.168.3.25 192.168.5.255

# Cause this host to announce itself to local subnets here

; remote announce = 192.168.1.255 192.168.2.44

# Browser Control Options:

# set local master to no if you don't want Samba to become a master

# browser on your network. Otherwise the normal election rules apply

; local master = no

# OS Level determines the precedence of this server in master browser

# elections. The default value should be reasonable

; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This

# allows Samba to collate browse lists between subnets. Don't use this

# if you already have a Windows NT domain controller doing this job

; domain master = yes

# Preferred Master causes Samba to force a local browser election on startup

# and gives it a slightly higher chance of winning the election

; preferred master = yes

# Enable this if you want Samba to be a domain logon server for

# Windows95 workstations.

; domain logons = yes

# if you enable domain logons then you may want a per-machine or

# per user logon script

# run a specific logon batch file per workstation (machine)

; logon script = %m.bat

# run a specific logon batch file per username

; logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)

# %L substitutes for this servers netbios name, %U is username

# You must uncomment the [Profiles] share below

; logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:

# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server

; wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client

# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both

; wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on

# behalf of a non WINS capable client, for this to work there must be

# at least one WINS Server on the network. The default is NO.

; wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names

# via DNS nslookups. The built-in default for versions 1.9.17 is yes,

# this has been changed in version 1.9.18 to no.

dns proxy = no

# Case Preservation can be handy - system default is _no_

# NOTE: These can be set on a per share basis

; preserve case = no

; short preserve case = no

# Default case is normally upper case for all DOS files

; default case = lower

# Be very careful with case sensitivity - it can break things!

; case sensitive = no

#============================ Share Definitions ==============================

[homes]

comment = Home Directories

browseable = no

writable = yes

valid users = %S

create mode = 0664

directory mode = 0775

# If you want users samba doesn't recognize to be mapped to a guest user

; map to guest = bad user

# Un-comment the following and create the netlogon directory for Domain Logons

; [netlogon]

; comment = Network Logon Service

; path = /usr/local/samba/lib/netlogon

; guest ok = yes

; writable = no

; share modes = no

# Un-comment the following to provide a specific roving profile share

# the default is to use the user's home directory

;[Profiles]

; path = /usr/local/samba/profiles

; browseable = no

; guest ok = yes

# NOTE: If you have a BSD-style print system there is no need to

# specifically define each indivial printer

[printers]

comment = All Printers

path = /var/spool/samba

browseable = no

# Set public = yes to allow user 'guest account' to print

guest ok = no

writable = no

printable = yes

# This one is useful for people to share files

;[tmp]

; comment = Temporary file space

; path = /tmp

; read only = no

; public = yes

# A publicly accessible directory, but read only, except for people in

# the "staff" group

;[public]

; comment = Public Stuff

; path = /home/samba

; public = yes

; writable = yes

; printable = no

; write list = @staff

# Other examples.

#

# A private printer, usable only by fred. Spool data will be placed in fred's

# home directory. Note that fred must have write access to the spool directory,

# wherever it is.

;[fredsprn]

; comment = Fred's Printer

; valid users = fred

; path = /home/fred

; printer = freds_printer

; public = no

; writable = no

; printable = yes

# A private directory, usable only by fred. Note that fred requires write

# access to the directory.

;[fredsdir]

; comment = Fred's Service

; path = /usr/somewhere/private

; valid users = fred

; public = no

; writable = yes

; printable = no

# a service which has a different directory for each machine that connects

# this allows you to tailor configurations to incoming machines. You could

# also use the %U option to tailor it by user name.

# The %m gets replaced with the machine name that is connecting.

;[pchome]

; comment = PC Directories

; path = /usr/local/pc/%m

; public = no

; writable = yes

# A publicly accessible directory, read/write to all users. Note that all files

# created in the directory by users will be owned by the default user, so

# any user with access can delete any other user's files. Obviously this

# directory must be writable by the default user. Another user could of course

# be specified, in which case all files would be owned by that user instead.

[public]

path = /home/detack/app/tomcat

public = yes

browseable = yes

writable = yes

printable = no

guest ok = yes

# The following two entries demonstrate how to share a directory so that two

# users can place files there that will be owned by the specific users. In this

# setup, the directory should be writable by both users and should have the

# sticky bit set on it to prevent abuse. Obviously this could be extended to

# as many users as required.

;[myshare]

; comment = Mary's and Fred's stuff

; path = /usr/somewhere/shared

; valid users = mary fred

; public = no

; writable = yes

; printable = no

; create mask = 0765

G. 如何搭建一台Linux開發伺服器

在開發過程中,必然會出現多人同時工作、協著的情況,在嵌入式開發項目中更為平常,這樣可以加快項目周期,為產品上市佔得時間先機。目前,使用Linux作為開發產品的操作系統情況越來越多,使用越來越廣泛。為了交叉編譯,為了最接近開發目標,我們一般都會自己搭建一台Linux開發伺服器。Linux開發伺服器一些常用的功能必須支持,比如Samba、nfs、tftp、httpd等。 首先我們需要選擇合適的Linux操作系統作為伺服器的系統,推薦使用Fedora8、Fedora10等,筆者在長期使用的過程中覺得比較穩定吧!如何安裝該操作系統就不多說了。 裝好系統後,需要增加Linux OS用戶,可以使用命令#adser XXX;增加XXX用戶,#passwd XXX給其設置登錄密碼。當然使用圖形化創建用戶也很直觀、方便。在這個環節值得注意的一定要設置好該用戶的home目錄,一般都會設置到該用戶的工作目錄,各個用戶的工作目錄需要私有化、獨立開來,這樣方便些、安全些。 多用戶的賬戶有了,我們應該來打通網路功能了,Fedora有bug,在圖形化配置GATEWAY什麼的會不成功,請安裝如下方法修改: # cd cd /etc/sysconfig/network-scripts/ # vi ifcfg-eth0 修改配置文件如下: # Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller DEVICE=eth0 HWADDR=00:16:e6:db:c2:96 ONBOOT=yes BOOTPROTO=static //這個應該是「static」,而不是「dhcp」或「none」; USERCTL=yes PEERDNS=yes IPV6INIT=no NM_CONTROLLED=yes//這個應該是「yes」,如不修改,鏈接仍是disconnected; TYPE=Ethernet NETMASK=***.***.***.*** IPADDR=***.***.***.*** DNS1=***.***.***.*** DNS2=***.***.***.*** GATEWAY=***.***.***.*** step 3: # service network restart 接下來就需要調試一下Samba功能了,這樣在windows下編輯Linux下的代碼將非常的便利。命令行下操作方法如下: Vim /etc/samba/smbusers # Unix_name = SMB_name1 SMB_name2 … root = administrator admin nobody = guest pcguest smbguest dssun = dssun hmchen = hmchen 增加Samba用戶; Vim /etc/samba/smb.conf [dssun] comment = * path = /opt/STM/STLinux-2.3/devkit/dtvkit/dssun writeable = yes ; browseable = yes valid users = bluo, dssun, hmchen, hqian, sbxiang, tsfu, yrli 設置工作路徑,可讀寫性、有效訪問的用戶等。 在圖形化下也有配置菜單,這個就很簡單了,不再敘述。 有了Samba就方便很多了!編譯編輯都很不錯了!接下來要著手你的開發平台軟體,這個對於不同平台的SDK有不同的處理方法,根據自己的SDK來處理。 有了SDK後,我們編譯通過後,一般都會進行調試,如何方便的調試呢?一般都會想到使用nfs調試。 以Fedora為例,一般默認安裝的沒有包括tftp功能,可以使用yum來安裝,方便! #yum install tftp; #yum install tftp-server 還需要更改一下tftp的配置,如下: vim /etc/xinetd.d/tftp 修改server_args = -s /tftpboot -c,這里的-c一定要加上,否則只能下載不能上傳!!! service tftp { disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot -c per_source = 11 cps = 100 2 flags = IPv4 } # mkdir /tftpboot # chmod 777 -R /tftpboot/ # service xinetd restart 記得要關閉防火牆、seLinux.不disabled seLinux,Samba有可能只能讀不能寫,切記。

H. 懂linux的進如何為組建立SAMBA伺服器

一. 由Linux向windows提供文件/目錄及列印機共享。
在Linux伺服器上的Samba運行起來以後,Linux就相當於一台文件及列印伺服器,向win
dows
和Linux
Samba客戶提供文件及列印服務。工作在共享模式或者用戶模式下的兩種方法較為常見(
Secu
rity=share
or Security=user) ,其中有以下常見問題。 環境: Redhat Linux 6.x
1.共享模式時從windows 98客戶端不能從網上鄰居中看到伺服器,或者看到後不能點擊
進入
共享資源
說密碼不對等等。
a. 沒有去掉行guest account = pcguest前面的注釋符號
b. 沒有創建guest帳號pcguest (#useradd pcguest即可)
c. windows 98默認發送加密的口令,而/etc/smb.conf中沒有enable Samba加密口令。

或者也可以編輯windows 98注冊表,讓它發送文本口令(不被建議的)
2. 在/etc/smb.conf中定義了完全可寫共享目錄,但實際操作時不能寫入。
a. 特別要注意的是:LINUX本身的文件及目錄許可權永遠大於SAMBA定義的許可權,要讓某共
享資
源目錄
可以被寫,首先要保證在LINUX下面該目錄可以被相應的用戶可寫,這是前提。
3.在共享模式下如何對某共享目錄加用戶名及密碼保護?
a. 看下面的共享資源定義例子:
security = SHARE
username map = /etc/smbusers
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY
client code page = 936
os level = 40
local master = yes
preferred master = yes
domain master = yes
guest account = pcguest
encrypt passwords = yes
smb passwd file = /etc/smbpasswd
[sales]
comment = test folder
path = /sales/training
guest ok = no
writable = yes
valid users = @sales
write list = @sales
在上面的例子中,我們定義了security=share and samba encrypt password,共享目錄
名sa
les
不是guest用戶可訪問的,需要屬於sales組里的用戶可訪問同時也可寫,當然在Linux下
面要
保證
/sales/training目錄可被組sales可寫,這樣以後
定義你的windows logon(不是NT域登錄)的用戶名為組sales里的用戶名,然後在網上
鄰居
中雙擊
sales時會提示你密碼,該密碼是你在Samba伺服器上定義的samba加密的口令,在上面的
例子

用戶名和密碼對存放在文件/etc/smbpasswd中,當然你事先要有系統用戶名在/etc/pas
swd中

4. windows用戶經常不能在網上鄰居中瀏覽到Samba伺服器的名字。
a. windows的網上鄰居服務是非常不可靠的服務,它所建立的瀏覽列表不可靠,由眾多
因素
引起。
b. 一種可靠的解決辦法是直接用『查找』-『計算機』-打入samba伺服器的主機名進行
查找

注意要確保你在windows啟動時沒有取消登錄。
c.你也可以在DOS窗口用net use 命令:如c: net use m: \sambaservernamesharereso
urce
name
5.伺服器端的測試配置工具
a. 在配置完/etc/smb.conf後運行testparm檢測配置文件中是否有相應語法錯誤
b. 在Samba服務起來後,用smbstatus報告用戶使用和登錄情況。
c. 在更改過配置文件後,運行/etc/rc.d/init.d/smb restart重讀配置文件
二.在Linux客戶機上使用Linux Samba伺服器
1. 在Linux客戶機上使用Smbclient
a. 列出計算機192.168.100.1上所有可用的共享資源:
smbclient -L 192.168.100.1
如果詢問口令,則直接回車。
也可用名字如:
smbclient -L sh3
若不知道sh3的IP地址,也可用
smbclient -L sh3 -I 192.168.100.1
b. 以某用戶身份連接到Samba伺服器192.168.100.1上的共享資源sales
smbclient //192.168.100.1/sales -U jephe
提示口令後輸入口令,也可把口令打在命令行上用%號分隔
為: smbclient //192.168.100.1/sales -U jephe%password
提示符為smb:,就象是FTP一樣
也可用名字如:
smbclient //sh3/sales -I 192.168.100.1 -U jephe
你也可以用\符號,你的SHELL可能會過濾到特殊符號,則要這樣寫
#smbclient \\sh3\sales
2. 通過IP地址查找netbios名字
a.在windows下用
c:nbtstat -A 192.168.100.1
如果知道netbios名字,可用下面的命令得知提供某機器哪些服務
c:nbtstat -a hydra
b.在Linux下用
#nmblookup -A 192.168.100.1
在一個網段內可用下面的命令檢測哪些主機在提供samba共享服務:
#nmblookup -d 2 * or #nmblookup -B 192.168.100.255 *
檢測其它網段內的某台機器是否提供samba服務
#nmblookup -A 192.168.15.48
但不能用 #nmblookup -B 192.168.15.255 *,因為一般的路由器和Linux雙宿主機不轉發
子網
直接廣播。
3. netbios over TCP/IP使用的協議及埠號
a. 共有三種netbios服務
netbios-ns 137/udp(大多數) and 137/tcp
netbios-dgm 138/udp(大多數) and 138/udp
netbios-ssn 139/tcp
b.windows機器上的PC應用程序通過不同機器間的netbios名字來彼此通訊。
c. 每次當windows機器啟動時,它向整個網段內發出137/udp廣播,一來登記向某
工作組內的主瀏覽器登記netbios名字,二來確信整個子網內沒有與之相同的名字
d. 網上鄰居中所建立起來的瀏覽列表僅僅是列表,看不到也沒有關系,同樣也可以通過

計算機查找,net use命令等來與別的計算機通訊,共享文件和列印機
e. 不在同一網段內的機器或者是撥號到LAN上的PPP伺服器後不可能進行網上鄰居的瀏覽

這是因為子網內的廣播不被串列線路和路由器轉發。
f. 如何在撥號到LAN上的PPP伺服器後使用LAN上的Samba伺服器?
<1> 在windows目錄下編輯c:windowslmhosts
如: 192.168.11.3 sh3 #PRE #DOM:sales
執行nbtstat -R 去enable它,不需要重啟windows
<2> 你必須登錄windows,若是用戶模式的samba,你應該選擇windows NT登錄
<3> 其它設置跟LAN上的機器一樣
<4> 撥號建立連接後,在查找『計算機』功能定位資源
<5> 現在你能使用遠端伺服器上的目錄和列印機。
在不同網段內的機器也可參照此做法,也可用plug-gw代理tcp/139號埠訪問另一網段
上的
samba
伺服器。
4. 用Microsoft FTP 伺服器的簡便方法。 ftp.microsoft.com
a. 加『ftp到lmhosts文件
198.105.232.1 ftp #PRE
運行nbtstat -R
b. net view \ftp
c. net use g: \ftpdata
d. dir g:
5. smbmount 的使用
a. #smbmount //192.168.100.1/pub /mnt/sh3 -U jephe%password

I. 如何在linux搭建完整的web伺服器

可以參考如下Web伺服器的建立過程。示例環境及web伺服器軟體:

Ubuntu 12.04
LAMP(Linux,Apache,Mysql,PHP)

1、安裝Apache

(1)在安裝HTTP Server之前需安裝APR(Apache Portable Runtime)和APR-util安裝APR
$ tar zxvf apr-1.4.6.tar.gz
$ cd apr-1.4.6/
$ ./configure
$ make
$ sudo make install

(2)安裝APR-util

$ tar zxvf apr-util-1.4.1.tar.gz
$ cd apr-util-1.4.1
$ ./configure –with-apr=/usr/local/apr (whereis apr)
$ make
$ sudo make install

(3)安裝httpd-2.4.2.tar.bz2默認安裝位置/usr/local/apache2網頁放在/usr/local/apache2/htdocs配置文件/usr/local/apache2/conf/httpd.conf

$ tar jxvf httpd-2.4.2.tar.bz2
$ cd httpd-2.4.2/
$ ./configure
$ make
$ sudo make install

(4)啟動HTTP Server$ sudo /usr/local/apache2/bin/apachectl startAH00558: httpd: Could not reliably determine the server』s fully qualified domain name, using 127.0.1.1. Set the 『ServerName』 directive globally to suppress this message

(5)查看http是否正常運行$ netstat -a | grep httptcp 0 0 *:http *:* LISTEN

(6)在瀏覽器輸入127.0.0.1如果正常應該顯示「It works!」

2、安裝MySQL

(1)、下載安裝mysql-5.5.25.tar.gz,默認安裝位置/usr/local/mysql/

$ tar zxvf mysql-5.5.25.tar.gz
$ cd mysql-5.5.25/
$ sudo groupadd mysql
$ sudo useradd -r -g mysql mysql
$ cmake .
$ make
$ sudo make install
$ cd /usr/local/mysql/
$ sudo chown -R mysql .
$ sudo chgrp -R mysql .
$ sudo scripts/mysql_install_db –user=mysql
$ sudo chown -R root .
$ sudo chown -R mysql data/
$ sudo cp support-files/my-medium.cnf /etc/my.cnf
$ sudo cp support-files/mysql.server /etc/init.d/mysql.server

(2)、啟動MySQL:
方法1:$ sudo service mysql.server start
方法2:$ sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &

3、安裝PHP

(1)安裝下載php-5.4.4.tar.gz

$ tar zxvf php-5.4.4.tar.gz
$ cd php-5.4.4
$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --enable-mbstring --with-mcrypt(可能需要安裝libmcrypt-dev )
$ sudo make install
$ sudo cp php.ini-development /usr/local/lib/php.ini

(2)配置HTTP Server使之支持PHPapache配置文件/usr/local/apache2/conf/httpd.conf修改或添加如下配置

<;IfMole dir_mole>
DirectoryIndex index.php
<;/IfMole>
<;FilesMatch \.php$>
SetHandler application/x-httpd-php
<;/FilesMatch>

(3)重啟HTTP Server
$ sudo /usr/local/apache2/bin/apachectl restart

熱點內容
邏輯錯誤預編譯可以檢查出來嗎 發布:2024-04-20 15:58:28 瀏覽:1000
mc中國版伺服器地址 發布:2024-04-20 15:33:13 瀏覽:411
手機修改wifi密碼網站是什麼 發布:2024-04-20 15:22:05 瀏覽:323
js源碼下載 發布:2024-04-20 15:05:16 瀏覽:20
編譯翻譯的區別 發布:2024-04-20 14:55:53 瀏覽:894
登錄之後qq密碼要在哪裡看 發布:2024-04-20 14:55:03 瀏覽:731
天龍多開腳本 發布:2024-04-20 14:53:05 瀏覽:771
同一段代碼編譯的長度不同 發布:2024-04-20 14:24:14 瀏覽:380
緩存美劇權力的游戲 發布:2024-04-20 14:16:52 瀏覽:988
如何刪除word文件保存密碼 發布:2024-04-20 14:15:18 瀏覽:825