Discuz!大师网

搜索
查看: 2961|回复: 1

用iphone搭建php+mysql环境web服务器

[复制链接]
发表于 2013-6-5 13:40:43 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
在iphone上安装了lighttpd+php+mysql和discuz论坛

跑起来速度不是很慢,比较稳定。
跑其他的php+mysql的应用应该也没问题。


主要参考了这篇文章:http://www.wickedpsyched.net/iphone/databases
mysql跑着不太卡,机器还是很快的。耗电怎么样不清楚。
mysql的安装很简单,按照下面的步骤来就行,不过最好在itunes里把iphone的名字改成全英文的,不然有可能会启动不了mysql。
1.系统没有wget的话在pc上下载mysql.tgz再通过scp传上去。
2.运行mysql_installdb如果提示权限问题就用chmod -R +755 mysql命令改一下目录权限
3.mysql.tgz解压后应该放在/var/root下,目录结构是/var/root/mysql
4.装完记得给mysql设置好root密码
进入/var/root/mysql/bin
执行mysqldadmin -u root -p password “你的新密码”
提示输入当前password,直接回车
MySQL

Ported over, seems to work fine so far, install howto, can run this all directly on the iphone:
# pwd
/var/root
# wget http://wickedpsyched.net/iphone/databases/mysql.tgz
# tar zxf mysql.tgz
# cd mysql/bin
# ./mysql_install_db
[snip]
Installing MySQL system tables…
OK
Filling help tables…
OK
Now start the daemon (you should really make a local mysql user but –user will work for now):
# ./mysqld_safe –user=root &
[1] 284
# Starting mysqld daemon with databases from /var/root/mysql//var
# ./mysql mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.45 Source distribution
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> select host from user where host like ‘%iPhone%’;
+——–+
| host |
+——–+
| iPhone |
+——–+
1 row in set (0.02 sec)
回复 马甲回复

使用道具 举报

发表于 2014-8-8 19:00:00 | 显示全部楼层
可以这样搭建的么?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|网站地图|小黑屋|展会网|Discuz站长论坛 |天天打卡

GMT+8, 2024-4-28 23:09 , Processed in 0.026010 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表